﻿using System;
using System.Linq.Expressions;
using System.Collections.Generic;

namespace MVVM.Repository {
    public interface IUnitOfWork {

        //Basic C.R.U.D. operations
        void Add<T>(T _entity) where T : class;
        void Delete<T>(T _entity) where T : class;
        void Update<T>(T _entity) where T : class;
        void Commit();

        //Basic Select operations
        IList<T> GetAll<T>() where T : class;
        IList<T> GetByQuery<T>(Expression<Func<T, bool>> query) where T : class;
        T GetById<T>(Func<T, bool> _condition) where T : class;

    }
}
